package com.esri.core.map;

import com.esri.core.internal.util.d;
import com.esri.core.map.DataSource;
import java.io.IOException;
import java.io.StringWriter;
import org.codehaus.jackson.JsonGenerator;

/* loaded from: classes.dex */
public class RasterDataSource extends DataSource {
    private String a;
    private String b;

    public RasterDataSource() {
        setType(DataSource.DataSourceType.raster);
    }

    public String getWorkspaceId() {
        return this.a;
    }

    public void setWorkspaceId(String str) {
        this.a = str;
    }

    public String getDataSourceName() {
        return this.b;
    }

    public void setDataSourceName(String str) {
        this.b = str;
    }

    @Override // com.esri.core.map.DataSource
    public String toJson() throws IOException {
        StringWriter stringWriter = new StringWriter();
        JsonGenerator a = d.a(stringWriter);
        a.writeStartObject();
        a.writeFieldName("type");
        a.writeString(getType().toString());
        a.writeFieldName("workspaceId");
        a.writeString(getWorkspaceId());
        a.writeFieldName("dataSourceName");
        a.writeString(getDataSourceName());
        a.writeEndObject();
        a.close();
        return stringWriter.toString();
    }
}
